package myset;

public class Student2 {
    private String name;
    private int age;
    private int Chinese;
    private int Math;
    private int Engish;

    public Student2() {
    }

    public Student2(String name, int age, int Chinese, int Math, int Engish) {
        this.name = name;
        this.age = age;
        this.Chinese = Chinese;
        this.Math = Math;
        this.Engish = Engish;
    }


    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return age
     */
    public int getAge() {
        return age;
    }

    /**
     * 设置
     * @param age
     */
    public void setAge(int age) {
        this.age = age;
    }

    /**
     * 获取
     * @return Chinese
     */
    public int getChinese() {
        return Chinese;
    }

    /**
     * 设置
     * @param Chinese
     */
    public void setChinese(int Chinese) {
        this.Chinese = Chinese;
    }

    /**
     * 获取
     * @return Math
     */
    public int getMath() {
        return Math;
    }

    /**
     * 设置
     * @param Math
     */
    public void setMath(int Math) {
        this.Math = Math;
    }

    /**
     * 获取
     * @return Engish
     */
    public int getEngish() {
        return Engish;
    }

    /**
     * 设置
     * @param Engish
     */
    public void setEngish(int Engish) {
        this.Engish = Engish;
    }

    public String toString() {
        return "Student2{name = " + name + ", age = " + age + ", Chinese = " + Chinese + ", Math = " + Math + ", Engish = " + Engish + "}";
    }

    //求总分
    public int getSum() {
        int sum=Chinese + Math + Engish;
        return sum;
    }
}
